<script type="text/javascript" src="<?=$this->publicUrl ?>/scripts/jquery.form.js"></script>
<script type="text/javascript" src="<?=$this->publicUrl ?>/scripts/jquery.validate.js"></script>
<script type="text/javascript" src="<?=$this->publicUrl ?>/scripts/niceedit/nicEdit.js"></script>
<script type="text/javascript">
$(function() {
	$("#formCadastro").validate();
	
});	
</script>
<style type="text/css">
dt {
width: 50px;
}
dd {
float: left;
}
span label {
width: auto;
margin-left: 155px;
text-align: left !important;
}
span input {
width: 20px !important;
margin-right: 5px !important;
text-align: left;
display: inline;
border: 1px solid #000;
}
.obs { float: left; margin-top: 7px; margin-left: 5px;} 
.formTexto textarea, .formTexto input{
width: 500px !important;
}

.formTexto span{
width: 500px !important;
float: left;
}

.formTexto input.submit,.formTexto input.areas {
width: auto !important;
}
.formTexto input.submit {
margin-left: 150px !important;
clear: left;
}

</style>
<h1 class="textos"><?=ucfirst($this->acao)?> texto</h1>

<div id="erros"></div>

<form name="formTexto" enctype="multipart/form-data" class="formTexto" method="post" id="formCadastro"	action="<?=$this->baseUrl ?>/admintextos/salvar">
<input type="hidden" name="id" value="<?=@$this->texto->id?>" />
<input type="hidden" name="grupos" value="<?=@$this->texto->id_grupo?>" />
<fieldset>

<label>Título:</label> <input type="text"
	name="titulo" class="required" value="<?=@$this->texto->titulo?>"  /><br />
	
<label>Descrição:</label>
<input type="text" name="descricao" value="<?=@$this->texto->descricao ?>" /><br clear="all" />

<label>Texto:</label>
<textarea class="required" <? if ($this->acao == 'editar') : ?>readonly="readonly" <? endif; ?> name="texto"  rows="10" cols="30"><?=@$this->Br2nl(utf8_encode($this->texto->texto))?></textarea> <br />



<label>Palavras-Chave: </label> <input type="text" value="<?=$this->tags?>" size="30" name="tags" /> <span class="obs">(separar por vírgula)</span>

<?=$this->areas ?>
</fieldset>

<br clear="all" />
<input type="submit" class="submit" value="salvar" class="enviar" /></form>
 